import Vue from 'vue'
// 导入路由
import Router from 'vue-router'
Vue.use(Router)


export default new Router({
  routes: [
    {
      path:'',
      redirect:'/home'
    },
    {
      path:'/home',
      component:()=>import('../pages/home/Home')
    },
    {
      path:'/category',
      component:()=>import('../pages/category/category')
    },
    {
      path:'/car',
      component:()=>import('../pages/car/car')
    },
    {
      path:'/profile',
      component:()=>import('../pages/profile/profile')
    },
    {
      // 动态携带id信息
      path:'/datail/:iid',
      component:()=>import('../pages/detail/detail.vue')
    }
  ],
  mode:'history'
})


